<?php $default_nr_person = $details->object_type_ID == 2 ? 2 : 2; ?>

<?php
    $person_s = $details->cur_room->room_max_person > 1 ? lang('res.persons') : lang('res.person');

    if ($this->lang->mci_current() == 'me'):

        if ($details->cur_room->room_max_person == 1)
            $person_s = lang('res.person');
        else if ($details->cur_room->room_max_person >= 2 && $details->cur_room->room_max_person <= 4)
            $person_s = lang('res.persone');
        else
            $person_s = lang('res.persons');

    endif;
?>

<div class="content">

    <div class="guestrating">

        <?php if ($details->avg_reviews_score > 0): ?>

                <div class="pull-right" style="margin-left: 33px">

                    <div class="rating"><strong><?= lang($details->avg_reviews_score); ?> <?= $details->avg_reviews_score ?></strong></div>

                    <a class="view_all_reviews" href="javascript:"><?= lang('dtl.see_all_reviews'); ?></a>

                </div>

            <?php endif; ?>

    </div>

    <div class="clearfix">

        <h1 class="pull-left"><?= $details->object_name ?></h1>
        <?php if ($details->object_number_of_stars != ""): ?>
                <span class="hotel-star star_<?= $details->object_number_of_stars ?> pull-left">&nbsp;</span>
            <?php endif; ?>

    </div>

    <p class="hoteladdress"><?= strip_tags($details->object_address, '<b><strong>') ?></p> 

    <div class="holder clearfix">

        <div class="pull-left">

            <div class="pikachoose">

                <div class="gallery_img">
                    <img src="<?= HOST_URL_HOTELS . $details->photo_path . '/thumb_500x304/' . $details->photo_name; ?>" alt="<?= $details->photo_title ?>">
                </div><!-- Fake responsive image -->

                <ul id="pikame" class="jcarousel-skin-pika">

                    <?php
                        foreach ($details->cur_room->photos as $photo):

                            $thumbnail = HOST_URL_HOTELS . $details->photo_path . '/rooms/' . $photo->path . '/thumb_500x304/' . $photo->photo_name;
                            ?>    

                            <li><img src="<?= $thumbnail ?>" alt="<?= $photo->photo_title ?>" style="display: none"></li>
                        <?php endforeach; ?>

                    <?php
                        foreach ($details->photos as $photo):

                            $thumbnail = HOST_URL_HOTELS . $photo->path . '/thumb_500x304/' . $photo->photo_name;
                            ?>    

                            <li><img src="<?= $thumbnail ?>" alt="<?= $photo->photo_title ?>" style="display: none"></li>
                        <?php endforeach; ?>

                </ul><!-- Main Pica Gallery -->

            </div>

        </div>

        <div class="pull-right details">

            <div class="destination">

                <a href="javascript:" id="show_on_map" data-id="<?= $details->object_ID ?>"><img alt="" src="<?= base_url() ?>assets/img/showonmap_<?= $this->lang->mci_current() ?>.png"></a>

                <p><?= $details->destination_name ?></p>
                <p><?= lang('montenegro'); ?></p>
            </div>






            <div class="detailbox">

                <dl class="clearfix">

                    <dt><?= lang('dtl.room'); ?>:</dt>
                    <dd>
                        <div class="maxps ps_<?= $details->cur_room->room_max_person ?>" title="<?= lang('form.for'); ?> <?= $details->cur_room->room_max_person ?> <?= $person_s ?>"></div>
                        <?= lang('room.' . underscore($details->cur_room->room_type_name)); ?>  <span class="gray"><?= $details->cur_room->service_name ?></span>
                        <?php if ($details->cur_room->room_description != "") echo '<br>' . $details->cur_room->room_description; ?>
                    </dd>

                    <?php foreach ($details->polices as $key => $value): ?>

                            <dt><?= lang('dtl.' . underscore($key)); ?></dt>

                            <dd><?= $value == "" ? '&nbsp;' : $value; ?> 
                                <?php
                                if ($this->lang->mci_current() == 'ru' && underscore($key) == 'accepted_credit_cards')
                                    echo '<br><br>';
                                ?>
                            </dd>

                        <?php endforeach; ?>

                </dl>
            </div>



            <div class="clearfix" id="scrool_to_price">
                <div class="form_prices pull-left calculation2 calculation">
                    <div class="inner_prices">
                        <ul>
                            <li class="personas"><?= lang('dtl.num_of_persons'); ?>: <span class="service_persons"><?= lang('dtl.adults'); ?>: <?= !isset($_GET['preview']) ? $_GET['nr_adults'] : $default_nr_person ?>, <?= lang('dtl.teenagers'); ?>: 0, <?= lang('dtl.children'); ?>: 0, <?= lang('dtl.babies'); ?>: 0</span></li>
                            <li class="periodes"><?= lang('dtl.period'); ?>: <span class="service_periods"><?= !isset($_GET['preview']) ? $_GET['check_in'] : '' ?> - <?= !isset($_GET['preview']) ? $_GET['check_out'] : '' ?></span></li>
                            <li class=""><?= $details->cur_room->service_name ?>: <span class="service_total"><?= !isset($_GET['preview']) ? $details->cur_room->selling_price : '0' ?> </span> <?= lang(currency_sign()); ?></li>
                            <li class="total clearfix"><b><?= lang('total'); ?>   : <span><?= !isset($_GET['preview']) ? $details->cur_room->total : '0' ?> </span> <?= lang(currency_sign()); ?></b> <input type="button" class="booknow check_available123 <?= $details->cur_room->room_selling_type_ID == 1 ? "request" : ""; ?>" value="<?= $details->cur_room->room_selling_type_ID == 1 ? lang('res.send_request') : lang('res.book_now'); ?>" id="book_now_input"></li>
                        </ul>
                        <div class="vat"><?= lang('vat') ?></div>
                        <div class="too_many"></div>

                    </div>
                </div>
            </div><!--calculation-->

            <div class="pull-right sociallinks">

                <!-- AddThis Button BEGIN -->
                <ul class="addthis_toolbox addthis_default_style">
                    <li>
                        <a class="addthis_button_tweet"></a>
                    </li>
                    <li>
                        <a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
                    </li>
                    <li>
                        <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
                    </li>
                    <li>
                        <a class="addthis_counter addthis_pill_style"></a>
                    </li>

                </ul>
                <!-- AddThis Button END -->

            </div>
        </div>
    </div><!-- / holder-->
</div>